﻿
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title></title>
    <link href="/CSS/bootstrap3.3.5/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.11.2.min.js" type="text/javascript"></script>


    <script src="/CSS/bootstrap3.3.5/js/bootstrap.js"></script>
    <script src="/Scripts/avalon.js"></script>
    <script src="/Scripts/jquery-migrate-1.1.0.min.js"></script>
    <script src="/JqueryPlug/dtGrid/jquery.dtGrid.js"></script>
    <script src="/Scripts/SZHLCommon.js?jsver=5"></script>
    <script src="/Scripts/city.js"></script>
    <!--[if IE]>
        <script src="../../Scripts/HTML5.js"></script>
    <![endif]-->
    <style type="text/css">
        .szhl_Upload {
            display: none;
        }

        .middle {
            line-height: 30px;
            vertical-align: middle;
            float: left;
            display: inline;
        }
    </style>
    <script type="text/javascript">

        var model = avalon.define({
            $id: "KQPZ",
            SHour: "00",
            SMinute: "00",
            EHour: "00",
            EMinute:"00",
            CompanyData: { "Type": "1", "StartTime": "",  "EndTime": "",  "Remark": "" },
            CompanyEdit: function () {
                if (model.SHour && model.SMinute)
                {
                    model.CompanyData.StartTime = model.SHour + ':' + model.SMinute;
                }
                if (model.EHour && model.EMinute) {
                    model.CompanyData.EndTime = model.EHour + ':' + model.EMinute;
                }
                var modelValue = JSON.stringify(model.CompanyData.$model);
                $.post("/API/SZHLAPI.ashx", { Action: "ADDKQPZ", P1: modelValue },
                function (result) {

                    if ($.trim(result.ErrorMsg) != "") {
                        parent.ComFunJS.winwarning(result.ErrorMsg);
                    } else {
                        parent.ComFunJS.winsuccess("保存成功");
                    }
                });
            },

            SetFrameHeight: function (framename) {
                var oFrm = document.getElementById(framename);
                oFrm.onload = oFrm.onreadystatechange = function () {
                    if (this.readyState && this.readyState != 'complete') return;
                    else {
                        var mainheight = $("#dvContent").height() - 45;
                        $("#" + framename).height(mainheight);
                        $("#mastmenu").height(mainheight);
                        $(window.frames[framename].document).find(".maindiv").css({ height: mainheight + "px", overflow: "auto" });
                    }
                }
            }
        });
        avalon.ready(function () {

            //获取主要菜单
            $.getJSON('/API/SZHLAPI.ashx?Action=GETKQPZ', function (resultData) {
                model.CompanyData = resultData.Result;
                if (resultData.Result.StartTime)
                {
                    var start = resultData.Result.StartTime.split(':');
                    model.SHour = start[0];
                    model.SMinute = start[1];

                    var end = resultData.Result.EndTime.split(':');
                    model.EHour = end[0];
                    model.EMinute = end[1];
                }
            })
        })

    </script>
</head>
<body ms-controller="KQPZ">
    <div class="container-fluid maindiv" style="margin: 20px">
        <div class="panel panel-default">
            <div class="panel-heading">考勤配置</div>
            <div class="panel-body">
                <div class="form-horizontal" style="margin:20px  auto auto 50px; ">
                    <div class="form-group">
                        <label for="StartTime" class=" col-xs-2 control-label text-right">签到时间</label>
                        <div class="col-xs-2">
                            <select class="form-control" ms-duplex="SHour">
                                <option value="00" ms-attr-selected="SHour=='00'?'selected':''">00</option>
                                <option value="01" ms-attr-selected="SHour=='01'?'selected':''">01</option>
                                <option value="02" ms-attr-selected="SHour=='02'?'selected':''">02</option>
                                <option value="03" ms-attr-selected="SHour=='03'?'selected':''">03</option>
                                <option value="04" ms-attr-selected="SHour=='04'?'selected':''">04</option>
                                <option value="05" ms-attr-selected="SHour=='05'?'selected':''">05</option>
                                <option value="06" ms-attr-selected="SHour=='06'?'selected':''">06</option>
                                <option value="07" ms-attr-selected="SHour=='07'?'selected':''">07</option>
                                <option value="08" ms-attr-selected="SHour=='08'?'selected':''">08</option>
                                <option value="09" ms-attr-selected="SHour=='09'?'selected':''">09</option>
                                <option value="10" ms-attr-selected="SHour=='10'?'selected':''">10</option>
                                <option value="11" ms-attr-selected="SHour=='11'?'selected':''">11</option>
                                <option value="12" ms-attr-selected="SHour=='12'?'selected':''">12</option>
                                <option value="13" ms-attr-selected="SHour=='13'?'selected':''">13</option>
                                <option value="14" ms-attr-selected="SHour=='14'?'selected':''">14</option>
                                <option value="15" ms-attr-selected="SHour=='15'?'selected':''">15</option>
                                <option value="16" ms-attr-selected="SHour=='16'?'selected':''">16</option>
                                <option value="17" ms-attr-selected="SHour=='17'?'selected':''">17</option>
                                <option value="18" ms-attr-selected="SHour=='18'?'selected':''">18</option>
                                <option value="19" ms-attr-selected="SHour=='19'?'selected':''">19</option>
                                <option value="20" ms-attr-selected="SHour=='20'?'selected':''">20</option>
                                <option value="21" ms-attr-selected="SHour=='21'?'selected':''">21</option>
                                <option value="22" ms-attr-selected="SHour=='22'?'selected':''">22</option>
                                <option value="23" ms-attr-selected="SHour=='23'?'selected':''">23</option>
                            </select>
                        </div>

                        <div class="col-xs-1" style="padding:0;margin:0;width:5px;line-height:34px">:</div>

                        <div class="col-xs-2">
                            <select class="form-control" ms-duplex="SMinute">
                                <option value="00" ms-attr-selected="SMinute=='00'?'selected':''">00</option>
                                <option value="01" ms-attr-selected="SMinute=='01'?'selected':''">01</option>
                                <option value="02" ms-attr-selected="SMinute=='02'?'selected':''">02</option>
                                <option value="03" ms-attr-selected="SMinute=='03'?'selected':''">03</option>
                                <option value="04" ms-attr-selected="SMinute=='04'?'selected':''">04</option>
                                <option value="05" ms-attr-selected="SMinute=='05'?'selected':''">05</option>
                                <option value="06" ms-attr-selected="SMinute=='06'?'selected':''">06</option>
                                <option value="07" ms-attr-selected="SMinute=='07'?'selected':''">07</option>
                                <option value="08" ms-attr-selected="SMinute=='08'?'selected':''">08</option>
                                <option value="09" ms-attr-selected="SMinute=='09'?'selected':''">09</option>
                                <option value="10" ms-attr-selected="SMinute=='10'?'selected':''">10</option>
                                <option value="11" ms-attr-selected="SMinute=='11'?'selected':''">11</option>
                                <option value="12" ms-attr-selected="SMinute=='12'?'selected':''">12</option>
                                <option value="13" ms-attr-selected="SMinute=='13'?'selected':''">13</option>
                                <option value="14" ms-attr-selected="SMinute=='14'?'selected':''">14</option>
                                <option value="15" ms-attr-selected="SMinute=='15'?'selected':''">15</option>
                                <option value="16" ms-attr-selected="SMinute=='16'?'selected':''">16</option>
                                <option value="17" ms-attr-selected="SMinute=='17'?'selected':''">17</option>
                                <option value="18" ms-attr-selected="SMinute=='18'?'selected':''">18</option>
                                <option value="19" ms-attr-selected="SMinute=='19'?'selected':''">19</option>
                                <option value="20" ms-attr-selected="SMinute=='20'?'selected':''">20</option>
                                <option value="21" ms-attr-selected="SMinute=='21'?'selected':''">21</option>
                                <option value="22" ms-attr-selected="SMinute=='22'?'selected':''">22</option>
                                <option value="23" ms-attr-selected="SMinute=='23'?'selected':''">23</option>
                                <option value="24" ms-attr-selected="SMinute=='24'?'selected':''">24</option>
                                <option value="25" ms-attr-selected="SMinute=='25'?'selected':''">25</option>
                                <option value="26" ms-attr-selected="SMinute=='26'?'selected':''">26</option>
                                <option value="27" ms-attr-selected="SMinute=='27'?'selected':''">27</option>
                                <option value="28" ms-attr-selected="SMinute=='28'?'selected':''">28</option>
                                <option value="29" ms-attr-selected="SMinute=='29'?'selected':''">29</option>
                                <option value="30" ms-attr-selected="SMinute=='30'?'selected':''">30</option>
                                <option value="31" ms-attr-selected="SMinute=='31'?'selected':''">31</option>
                                <option value="32" ms-attr-selected="SMinute=='32'?'selected':''">32</option>
                                <option value="33" ms-attr-selected="SMinute=='33'?'selected':''">33</option>
                                <option value="34" ms-attr-selected="SMinute=='34'?'selected':''">34</option>
                                <option value="35" ms-attr-selected="SMinute=='35'?'selected':''">35</option>
                                <option value="36" ms-attr-selected="SMinute=='36'?'selected':''">36</option>
                                <option value="37" ms-attr-selected="SMinute=='37'?'selected':''">37</option>
                                <option value="38" ms-attr-selected="SMinute=='38'?'selected':''">38</option>
                                <option value="39" ms-attr-selected="SMinute=='39'?'selected':''">39</option>
                                <option value="40" ms-attr-selected="SMinute=='40'?'selected':''">40</option>
                                <option value="41" ms-attr-selected="SMinute=='41'?'selected':''">41</option>
                                <option value="42" ms-attr-selected="SMinute=='42'?'selected':''">42</option>
                                <option value="43" ms-attr-selected="SMinute=='43'?'selected':''">43</option>
                                <option value="44" ms-attr-selected="SMinute=='44'?'selected':''">44</option>
                                <option value="45" ms-attr-selected="SMinute=='45'?'selected':''">45</option>
                                <option value="46" ms-attr-selected="SMinute=='46'?'selected':''">46</option>
                                <option value="47" ms-attr-selected="SMinute=='47'?'selected':''">47</option>
                                <option value="48" ms-attr-selected="SMinute=='48'?'selected':''">48</option>
                                <option value="49" ms-attr-selected="SMinute=='49'?'selected':''">49</option>
                                <option value="50" ms-attr-selected="SMinute=='50'?'selected':''">50</option>
                                <option value="51" ms-attr-selected="SMinute=='51'?'selected':''">51</option>
                                <option value="52" ms-attr-selected="SMinute=='52'?'selected':''">52</option>
                                <option value="53" ms-attr-selected="SMinute=='53'?'selected':''">53</option>
                                <option value="54" ms-attr-selected="SMinute=='54'?'selected':''">54</option>
                                <option value="55" ms-attr-selected="SMinute=='55'?'selected':''">55</option>
                                <option value="56" ms-attr-selected="SMinute=='56'?'selected':''">56</option>
                                <option value="57" ms-attr-selected="SMinute=='57'?'selected':''">57</option>
                                <option value="58" ms-attr-selected="SMinute=='58'?'selected':''">58</option>
                                <option value="59" ms-attr-selected="SMinute=='59'?'selected':''">59</option>

                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="EndTime" class="col-xs-2 control-label text-right">签退时间</label>
                        <div class="col-xs-2">
                            <select class="form-control" ms-duplex="EHour">
                                <option value="00" ms-attr-selected="EHour=='00'?'selected':''">00</option>
                                <option value="01" ms-attr-selected="EHour=='01'?'selected':''">01</option>
                                <option value="02" ms-attr-selected="EHour=='02'?'selected':''">02</option>
                                <option value="03" ms-attr-selected="EHour=='03'?'selected':''">03</option>
                                <option value="04" ms-attr-selected="EHour=='04'?'selected':''">04</option>
                                <option value="05" ms-attr-selected="EHour=='05'?'selected':''">05</option>
                                <option value="06" ms-attr-selected="EHour=='06'?'selected':''">06</option>
                                <option value="07" ms-attr-selected="EHour=='07'?'selected':''">07</option>
                                <option value="08" ms-attr-selected="EHour=='08'?'selected':''">08</option>
                                <option value="09" ms-attr-selected="EHour=='09'?'selected':''">09</option>
                                <option value="10" ms-attr-selected="EHour=='10'?'selected':''">10</option>
                                <option value="11" ms-attr-selected="EHour=='11'?'selected':''">11</option>
                                <option value="12" ms-attr-selected="EHour=='12'?'selected':''">12</option>
                                <option value="13" ms-attr-selected="EHour=='13'?'selected':''">13</option>
                                <option value="14" ms-attr-selected="EHour=='14'?'selected':''">14</option>
                                <option value="15" ms-attr-selected="EHour=='15'?'selected':''">15</option>
                                <option value="16" ms-attr-selected="EHour=='16'?'selected':''">16</option>
                                <option value="17" ms-attr-selected="EHour=='17'?'selected':''">17</option>
                                <option value="18" ms-attr-selected="EHour=='18'?'selected':''">18</option>
                                <option value="19" ms-attr-selected="EHour=='19'?'selected':''">19</option>
                                <option value="20" ms-attr-selected="EHour=='20'?'selected':''">20</option>
                                <option value="21" ms-attr-selected="EHour=='21'?'selected':''">21</option>
                                <option value="22" ms-attr-selected="EHour=='22'?'selected':''">22</option>
                                <option value="23" ms-attr-selected="EHour=='23'?'selected':''">23</option>
                            </select>
                        </div>

                        <div class="col-xs-1" style="padding:0;margin:0;width:5px;line-height:34px">:</div>

                        <div class="col-xs-2">
                            <select class="form-control" ms-duplex="EMinute">
                                <option value="00" ms-attr-selected="EMinute=='00'?'selected':''">00</option>
                                <option value="01" ms-attr-selected="EMinute=='01'?'selected':''">01</option>
                                <option value="02" ms-attr-selected="EMinute=='02'?'selected':''">02</option>
                                <option value="03" ms-attr-selected="EMinute=='03'?'selected':''">03</option>
                                <option value="04" ms-attr-selected="EMinute=='04'?'selected':''">04</option>
                                <option value="05" ms-attr-selected="EMinute=='05'?'selected':''">05</option>
                                <option value="06" ms-attr-selected="EMinute=='06'?'selected':''">06</option>
                                <option value="07" ms-attr-selected="EMinute=='07'?'selected':''">07</option>
                                <option value="08" ms-attr-selected="EMinute=='08'?'selected':''">08</option>
                                <option value="09" ms-attr-selected="EMinute=='09'?'selected':''">09</option>
                                <option value="10" ms-attr-selected="EMinute=='10'?'selected':''">10</option>
                                <option value="11" ms-attr-selected="EMinute=='11'?'selected':''">11</option>
                                <option value="12" ms-attr-selected="EMinute=='12'?'selected':''">12</option>
                                <option value="13" ms-attr-selected="EMinute=='13'?'selected':''">13</option>
                                <option value="14" ms-attr-selected="EMinute=='14'?'selected':''">14</option>
                                <option value="15" ms-attr-selected="EMinute=='15'?'selected':''">15</option>
                                <option value="16" ms-attr-selected="EMinute=='16'?'selected':''">16</option>
                                <option value="17" ms-attr-selected="EMinute=='17'?'selected':''">17</option>
                                <option value="18" ms-attr-selected="EMinute=='18'?'selected':''">18</option>
                                <option value="19" ms-attr-selected="EMinute=='19'?'selected':''">19</option>
                                <option value="20" ms-attr-selected="EMinute=='20'?'selected':''">20</option>
                                <option value="21" ms-attr-selected="EMinute=='21'?'selected':''">21</option>
                                <option value="22" ms-attr-selected="EMinute=='22'?'selected':''">22</option>
                                <option value="23" ms-attr-selected="EMinute=='23'?'selected':''">23</option>
                                <option value="24" ms-attr-selected="EMinute=='24'?'selected':''">24</option>
                                <option value="25" ms-attr-selected="EMinute=='25'?'selected':''">25</option>
                                <option value="26" ms-attr-selected="EMinute=='26'?'selected':''">26</option>
                                <option value="27" ms-attr-selected="EMinute=='27'?'selected':''">27</option>
                                <option value="28" ms-attr-selected="EMinute=='28'?'selected':''">28</option>
                                <option value="29" ms-attr-selected="EMinute=='29'?'selected':''">29</option>
                                <option value="30" ms-attr-selected="EMinute=='30'?'selected':''">30</option>
                                <option value="31" ms-attr-selected="EMinute=='31'?'selected':''">31</option>
                                <option value="32" ms-attr-selected="EMinute=='32'?'selected':''">32</option>
                                <option value="33" ms-attr-selected="EMinute=='33'?'selected':''">33</option>
                                <option value="34" ms-attr-selected="EMinute=='34'?'selected':''">34</option>
                                <option value="35" ms-attr-selected="EMinute=='35'?'selected':''">35</option>
                                <option value="36" ms-attr-selected="EMinute=='36'?'selected':''">36</option>
                                <option value="37" ms-attr-selected="EMinute=='37'?'selected':''">37</option>
                                <option value="38" ms-attr-selected="EMinute=='38'?'selected':''">38</option>
                                <option value="39" ms-attr-selected="EMinute=='39'?'selected':''">39</option>
                                <option value="40" ms-attr-selected="EMinute=='40'?'selected':''">40</option>
                                <option value="41" ms-attr-selected="EMinute=='41'?'selected':''">41</option>
                                <option value="42" ms-attr-selected="EMinute=='42'?'selected':''">42</option>
                                <option value="43" ms-attr-selected="EMinute=='43'?'selected':''">43</option>
                                <option value="44" ms-attr-selected="EMinute=='44'?'selected':''">44</option>
                                <option value="45" ms-attr-selected="EMinute=='45'?'selected':''">45</option>
                                <option value="46" ms-attr-selected="EMinute=='46'?'selected':''">46</option>
                                <option value="47" ms-attr-selected="EMinute=='47'?'selected':''">47</option>
                                <option value="48" ms-attr-selected="EMinute=='48'?'selected':''">48</option>
                                <option value="49" ms-attr-selected="EMinute=='49'?'selected':''">49</option>
                                <option value="50" ms-attr-selected="EMinute=='50'?'selected':''">50</option>
                                <option value="51" ms-attr-selected="EMinute=='51'?'selected':''">51</option>
                                <option value="52" ms-attr-selected="EMinute=='52'?'selected':''">52</option>
                                <option value="53" ms-attr-selected="EMinute=='53'?'selected':''">53</option>
                                <option value="54" ms-attr-selected="EMinute=='54'?'selected':''">54</option>
                                <option value="55" ms-attr-selected="EMinute=='55'?'selected':''">55</option>
                                <option value="56" ms-attr-selected="EMinute=='56'?'selected':''">56</option>
                                <option value="57" ms-attr-selected="EMinute=='57'?'selected':''">57</option>
                                <option value="58" ms-attr-selected="EMinute=='58'?'selected':''">58</option>
                                <option value="59" ms-attr-selected="EMinute=='59'?'selected':''">59</option>

                            </select>
                        </div>
                    </div>


                    <div class="form-group">
                        <div class=" col-xs-8   text-center">
                            <input type="button" value="保 存" ms-click="CompanyEdit()" class="btn btn-success btn-lg" width="180px" />

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
